package com.hao.tool.util.module.base.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * description
 *
 * @author RuiHaoZ on GZ.cmhk
 * @date 2019-11-22 23:38
 */
@Controller
@RequestMapping("")
public class BaseController {

    @GetMapping("/error")
    public ModelAndView toError() {
        ModelAndView mv = new ModelAndView("/common/4042");
        mv.addObject("message", "不被期待的请求");
        return mv;
    }

    @GetMapping("/404")
    public ModelAndView to404() {
        ModelAndView mv = new ModelAndView("common/4042");
        return mv;
    }

    @GetMapping("/coach")
    public ModelAndView toCoach() {
        ModelAndView mv = new ModelAndView("common/coach");
        return mv;
    }

    @GetMapping("/login")
    public ModelAndView toLogin() {
        ModelAndView mv = new ModelAndView("common/login");
        return mv;
    }

}
